package com.nf.util;

import java.sql.SQLException;
import java.sql.*;

public class CloseHelp {
    public static void CloseRsPdsConn(ResultSet rs, PreparedStatement pds, Connection conn){
        try{
            if(rs!=null) rs.close();
            if(pds!=null) pds.close();
            if(conn!=null) conn.close();
        }catch(SQLException e){
            e.printStackTrace();
        }
    }

    public static void CloseRsPdsConn(PreparedStatement pds,Connection conn){
        try{
            if(pds!=null) pds.close();
            if(conn!=null) conn.close();
        }catch(SQLException e){
            e.printStackTrace();
        }
    }
}

